package com.woniuxy.service.impl;

import com.woniuxy.dao.PermssionMapper;
import com.woniuxy.pojo.Permission;
import com.woniuxy.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    private PermssionMapper permssionMapper;
    @Override
    public List<Permission> selectMenusByUid(int uid) {
        return permssionMapper.selectMenussByUid(uid);
    }

    @Override
    public List<Permission> selectAllMenus() {
        return this.permssionMapper.selectAllMenus();
    }

    @Override
    public List<Permission> selectMenuIdsByRid(int rid) {
       List<Permission> permissionList=permssionMapper.selectPermissionsByRid(rid);
        return permissionList;
    }
}
